import instance from './http'


export const uploadAttribute = (data) => {
    return instance({
        method: 'post',
        url: config.uploadUrl,
        data,
    })
}

export const uploadFile = (data, url, type) => {
    return instance({
        method: 'put',
        url,
        data,
        headers: {
            'Content-Type': type,
        }
    })
}

export const uploadFileSearch = (data) => {
    return instance({
        method: 'post',
        url: 'https://gu1wwk2ghi.execute-api.cn-northwest-1.amazonaws.com.cn/v1',
        data,
        // headers: {
        //     'Content-Type': type,
        // }
    })
}

export const searchImage = (data) => {
    return instance({
        method: 'post',
        url: 'https://p1u1kegp32.execute-api.us-east-1.amazonaws.com/prod1/api/query',
        data,
    })
}

export const deleteImage = (data) => {
    return instance({
        method: 'post',
        url: 'https://p1u1kegp32.execute-api.us-east-1.amazonaws.com/prod1/api/query',
        data,
    })
}

export const tagManage = (data) => {
    return instance({
        method: 'post',
        url: 'https://p1u1kegp32.execute-api.us-east-1.amazonaws.com/prod1/api/query',
        data,
    })
}